import Vue from 'vue';
import App from './App.vue';
import router from './router';
import store from './store';
import 'windi.css';
import './assets/css/common.scss';
import './assets/css/iconfont.scss';

//将axios挂载到Vue实例的全局属性上 axios内部没有install
import axios from 'axios';
Vue.prototype.axios = axios;
// 挂载moment
import moment from 'moment';
Vue.prototype.moment = moment;
// 全局导入swiper
import VueAwesomeSwiper from 'vue-awesome-swiper';
// import style (<= Swiper 5.x)
import 'swiper/css/swiper.css';
Vue.use(VueAwesomeSwiper /* { default options with global component } */);

import {
  Collapse,
  CollapseItem,
  NoticeBar,
  Tab,
  Tabs,
  Popup,
  PullRefresh,
  List,
  Swipe,
  SwipeItem,
  Field,
  Button,
  IndexBar,
  IndexAnchor,
  Search,
  NavBar,
  Icon,
  Sticky,
  Toast,
  Cell,
  DropdownMenu,
  DropdownItem,
  ContactCard,
  Card,
} from 'vant';

import { SwipeCell } from 'vant';
import { SubmitBar } from 'vant';
import 'windi.css';

Vue.use(SubmitBar);
Vue.use(SwipeCell);
Vue.use(Collapse);
Vue.use(CollapseItem);
Vue.use(NoticeBar);
Vue.use(Tab);
Vue.use(Tabs);
Vue.use(Popup);
Vue.use(PullRefresh);
Vue.use(List);
Vue.use(DropdownMenu);
Vue.use(DropdownItem);
Vue.use(Field);
Vue.use(Button);
Vue.use(Search);
Vue.use(NavBar);
Vue.use(Icon);
Vue.use(Sticky);
// toast 方法是挂载在vue实例，使用时通过this.$toast调用
Vue.use(Toast);
Vue.use(Cell);
Vue.use(IndexBar).use(IndexAnchor);
Vue.use(Swipe);
Vue.use(SwipeItem);
Vue.use(ContactCard);
Vue.use(Card);

Vue.config.productionTip = false;

new Vue({
  router,
  store,
  render: (h) => h(App),
}).$mount('#app');
